package com.lcxw.hxzb.friendcircle.project.system.service.impl;

import java.util.List;
import com.lcxw.hxzb.friendcircle.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lcxw.hxzb.friendcircle.project.system.mapper.YwpdLikeMapper;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdLike;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdLikeService;

/**
 * 动态点赞Service业务层处理
 *
 * @author jjp
 * @date 2020-07-20
 */
@Service
public class YwpdLikeServiceImpl implements IYwpdLikeService {

    @Autowired
    private YwpdLikeMapper ywpdLikeMapper;

    /**
     * 查询动态点赞
     *
     * @param likeId 动态点赞ID
     * @return 动态点赞
     */
    @Override
    public YwpdLike selectYwpdLikeById(Long likeId) {
        return ywpdLikeMapper.selectYwpdLikeById(likeId);
    }

    /**
     * 查询动态点赞列表
     *
     * @param ywpdLike 动态点赞
     * @return 动态点赞
     */
    @Override
    public List<YwpdLike> selectYwpdLikeList(YwpdLike ywpdLike) {
        return ywpdLikeMapper.selectYwpdLikeList(ywpdLike);
    }

    /**
     * 新增动态点赞
     *
     * @param ywpdLike 动态点赞
     * @return 结果
     */
    @Override
    public int insertYwpdLike(YwpdLike ywpdLike) {
        ywpdLike.setCreateTime(DateUtils.getNowDate());
        return ywpdLikeMapper.insertYwpdLike(ywpdLike);
    }

    /**
     * 修改动态点赞
     *
     * @param ywpdLike 动态点赞
     * @return 结果
     */
    @Override
    public int updateYwpdLike(YwpdLike ywpdLike) {
        return ywpdLikeMapper.updateYwpdLike(ywpdLike);
    }

    /**
     * 批量删除动态点赞
     *
     * @param likeIds 需要删除的动态点赞ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLikeByIds(Long[] likeIds) {
        return ywpdLikeMapper.deleteYwpdLikeByIds(likeIds);
    }

    /**
     * 删除动态点赞信息
     *
     * @param likeId 动态点赞ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLikeById(YwpdLike ywpdLike) {
        return ywpdLikeMapper.deleteYwpdLikeById(ywpdLike);
    }

    @Override
    public int deleteYwpdLikesById(YwpdLike ywpdLike) {
        return ywpdLikeMapper.deleteYwpdLikesById(ywpdLike);
    }

    @Override
    public List<YwpdLike> selectYwpdLikeByDynamicId(Long dynamicId) {
        return ywpdLikeMapper.selectYwpdLikeByDynamicId(dynamicId);
    }

    @Override
    public List<YwpdLike> queryLikeByYwpdLike(YwpdLike ywpdLike) {
        return ywpdLikeMapper.queryLikeByYwpdLike(ywpdLike);
    }

    @Override
    public List<YwpdLike> queryByDynamicId(YwpdLike ywpdLike) {
        return ywpdLikeMapper.queryByDynamicId(ywpdLike);
    }

    @Override
    public List<YwpdLike> queryByCommentId(YwpdLike ywpdLike) {
        return ywpdLikeMapper.queryByCommentId(ywpdLike);
    }
}
